<template>
  <div>
<ul>
  <li  v-for="(v, i) in arr" :key="i">
<van-card
  num="2"
  :price="v.num"
  :desc="v.titi"
  title="xiangjia "
  thumb="https://img01.yzcdn.cn/vant/ipad.jpeg"
>
  <template #tags>
    <van-tag plain type="danger">{{v.titi}}</van-tag>
    <!-- <van-tag plain type="danger">标签</van-tag> -->
  </template>
  <template #footer>
    <van-button size="mini" class="min" >+</van-button>
    <input class="qqqq"  ref="qqqqqq" value="1">
    <van-button size="mini" class="min">-</van-button>
  </template>
</van-card>
  </li>
</ul>
 

    <div>
<van-submit-bar
  :price="zong"
  button-text="提交订单"
  tip="你的收货地址不支持同城送, 我们已为你推荐快递"
  tip-icon="info-o"
  @submit="onSubmit"
/>
    </div>
  </div>
  
</template>

<script>
import { getlink } from "a/getlink.js";
import Vue from 'vue';
import { Card } from 'vant';
Vue.use(Card);
import { SubmitBar } from 'vant';
Vue.use(SubmitBar);

export default {
  data() {
    return {
      arr: [],
      zong:5555,
      bbbb:""
    };
  },
  methods: {
    fun(i) {
      this.arr[i].style = !this.arr[i].style;
      if (this.arr[i].style) {
        this.zong += this.arr[i].num;
        console.log(this.arr[i].num)
      } else {
        this.zong -= this.arr[i].num;
      }
    },
    funadd(i){
     
       this.arr[i].value++;
      console.log(this.arr[i].count)
       this.arr[i].count++
      console.log(1)
    },
     funcc(){
      if(this.qqqqqq!==0){
            this.qqqqqq--
      }
      this.qqqqqq==0
    },
    onSubmit(){
      console.log(1)
    },
    
  },
  computed: {
    newzong() {
      return parseFloat(this.zong).toFixed(2);
    },
  },
  mounted() {
      getlink("/shoping/shopingcar").then((ok) => {
        // console.log(ok.data.shoping)
        this.arr = ok.data.shoping;
        console.log(this.arr);
      });
  },
  
};
</script>

<style scoped>

#left {
  box-sizing: border-box;
  padding: 0rem 0.1rem 0rem 0.1rem;
  width: 2rem;
}
#right {
  position: relative;
  width: 2rem;
}
img{
  margin:0.05rem 0.1rem 0rem 0.1rem;
  width: 0.7rem;
  height: 0.7rem;
}
#Selectall{
  width: 0.3rem;
  height: 0.3rem;
  -webkit-border-: 50%;
    border-radius: 50%;
} 
.qqqq{
  width: 0.2rem;
  line-height: 0.2rem;
  text-align: center;
  vertical-align: middle;
  border: none;
  outline: none;
}
.min{
  padding: 0.1rem 0.1rem;
}
</style>
